﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Planer.Model.Validators.Base
{
    public class YesNoValidator : Validator<string>
    {
        public override void Validate(string YesNo)
        {
            if (YesNo == null || YesNo == "") throw new ArgumentNullException("YesNo", NULL_ARGUMENT_MESSAGE);
            if (YesNo != "y" && YesNo != "n")
            {
                this.status = OperationStatusType.ERROR;
                this.errors.Add("Недопустимое значение. y/n - позволены");
            }
        }
    }
}
